<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<html >
<head>
    <meta charset="UTF-8">
    <title th:text="#{problem} + ' - Online Judge'"></title>
    <meta http-equiv="keywords" content="ACM,OJ,OnlineJudge,JAVA,C++,HappyOJ,IDE,在线判题系统,在线IDE">
    <meta http-equiv="description" content="Topic of Online Judge System for ACM">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" th:href="@{/css/styles.css}" >
    <script th:src="@{/js/jquery-1.7.2.js}"></script>
    <script th:src="@{/js/gdoj.js}"></script>
</head>
<body>
<div th:replace="common::web-navbar"></div>
<div class="container">
    <div class="content">
        <div class="content-with-sidebar">
            <div id="nav-content" >
                <a th:href="@{/problemset}" class="current">[[#{problems}]]</a>
                <a th:href="@{/problemset/status}">[[#{status}]]</a>
                <a th:href="@{/problemset/standings}">[[#{standings}]]</a>
                <a th:href="@{/admin/problem/new}" th:if="${session.session_user_admin}">[[#{new-problem}]]</a>
            </div>
            <div class="">
                <table class="problem">
                    <tr class="header">
                        <th class="status left-item">[[#{problem.status}]]</th>
                        <th class="title">
                            [[#{problem}]]
                            <div style="float:right;text-align:right;padding: 0px;">[[#{tag}]]</div>
                        </th>
                        <th class="solved">
                            [[#{problem.statistic}]]
                        </th>
                        <th class="ratio" th:if="${session.session_user_admin}">
                            [[#{admin}]]
                        </th>
                    </tr>
                    <tr th:if="${pageInfo.size == 0}"><td class="left-item dark" colspan="5" style="text-align: left;">[[#{no-record}]]</td></tr>
                    <tr th:each="problem,stat : ${pageInfo.list}" th:class="${stat.even}?'dark'">
                        <td class="status left-item">
                            <span th:if="${problem.status == 1}" th:title="#{problem.status_solved}" >
                                <svg class="problem-user-status" viewBox="0 0 1024 1024" p-id="15210"><path d="M512.640551 914.284317a402.259998 402.259998 0 1 1 124.334908-784.772688l84.840291-84.4746a511.967271 511.967271 0 1 0 134.939945 845.477379l-77.160782-76.795091A399.334471 399.334471 0 0 1 512.640551 914.284317zM373.312315 363.188119L293.226006 438.886137l305.717599 292.552726 80.086309-73.138182 344.115144-329.121816-79.720618-78.989236-344.115144 329.121816z" fill="#8DC21F" p-id="15211"></path></svg>
                            </span>
                            <span th:if="${problem.status == 2}" th:title="#{problem.status_tried}" >
                                <svg class="problem-user-status" viewBox="0 0 1024 1024" p-id="33088"><path d="M0 512a512 512 0 1 1 1024 0A512 512 0 0 1 0 512z m93.013333 0a418.986667 418.986667 0 1 0 837.973334 0 418.986667 418.986667 0 0 0-837.973334 0z m355.84 58.709333l-29.354666-245.504a82.688 82.688 0 1 1 164.096 0l-29.44 245.504a53.077333 53.077333 0 0 1-105.301334 0zM503.466667 791.296a69.802667 69.802667 0 1 1 0-139.690667 69.802667 69.802667 0 0 1 0 139.690667z" fill="#F86060" p-id="33089"></path></svg>
                            </span>
                        </td>

                        <td class="title">
                            <div class="problem-link">
                                <span th:if="${problem.defunct!='N'}" th:title="#{problem.invisible}" >
                                    <svg class="problem-disable" viewBox="0 0 1024 1024" p-id="29660"><path d="M253.6 679.2l109.6-109.6C356 552 352 532.8 352 512c0-88 72-160 160-160 20.8 0 40 4 57.6 11.2l82.4-82.4C607.2 264.8 560 256 512 256c-168 0-329.6 106.4-384 256 24 65.6 68.8 123.2 125.6 167.2z" p-id="29661" fill="#bfbfbf"></path><path d="M416 512v4.8L516.8 416H512c-52.8 0-96 43.2-96 96zM770.4 344.8l163.2-163.2L888 136l-753.6 753.6 45.6 45.6 192.8-192.8A390.4 390.4 0 0 0 512 768c167.2 0 330.4-106.4 384.8-256-24-65.6-69.6-123.2-126.4-167.2zM512 672c-20 0-40-4-57.6-11.2l53.6-53.6h4.8c52.8 0 96-43.2 96-96v-4.8l53.6-53.6C668 472 672 492 672 512c0 88-72 160-160 160z" p-id="29662" fill="#bfbfbf"></path></svg>
                                </span>
                                <a th:href="@{/problemset/problem/{problem_id}(problem_id=${problem.problem_id})}" th:text="${problem.problem_id} + '.' + ${problem.title}"></a>
                            </div>
                            <div class="tags" style="float:right;text-align:right;padding: 0px;">
                                <span th:each="tag : ${problem.tags}">
                                    <a th:href="'/problemset?tag=' + ${tag.name}" class="tag" th:tag="${tag.name}" th:text="${tag.name}"></a>
                                </span>
                            </div>
                        </td>
                        <td class="solved">
                            <a th:href="@{/problemset/{problem_id}/status(problem_id=${problem.problem_id})} + '/page/1'" title="users solved this problem" th:text="${problem.solved}"></a>
                            <span class="statistic-submit" title="all submissions"><sub th:text="'/&nbsp;' + ${problem.submit}"></sub></span>
                        </td>
                        <td class="ratio" th:if="${session.session_user_admin}">
                            <a class="edit-problem" th:title="#{edit}" th:href="@{/admin/problem/edit/{problem_id}(problem_id=${problem.problem_id})}">
                                <svg class="edit-problem-icon" viewBox="0 0 1024 1024" p-id="7668"><path d="M498.631111 584.817778a14.222222 14.222222 0 0 0 7.850667-3.982222l375.751111-375.751112a14.222222 14.222222 0 0 0 0-20.081777l-48.298667-48.298667a14.222222 14.222222 0 0 0-20.081778 0L438.613333 511.886222a14.222222 14.222222 0 0 0-4.096 8.192l-9.955555 76.231111 73.955555-11.491555z m443.904-460.174222a99.555556 99.555556 0 0 1 0 140.8L566.840889 641.137778a99.555556 99.555556 0 0 1-55.182222 27.989333l-130.161778 20.195556a42.666667 42.666667 0 0 1-48.867556-47.672889l17.351111-132.608a99.555556 99.555556 0 0 1 28.330667-57.457778l375.182222-375.239111a99.555556 99.555556 0 0 1 140.8 0l48.241778 48.298667z" fill="#979797" p-id="7669"></path><path d="M861.866667 602.851556a42.666667 42.666667 0 1 1 85.333333 0V921.6a88.177778 88.177778 0 0 1-88.177778 88.177778H130.844444A88.177778 88.177778 0 0 1 42.666667 921.6V193.422222c0-48.696889 39.480889-88.177778 88.177777-88.177778h319.374223a42.666667 42.666667 0 0 1 0 85.333334H130.844444a2.844444 2.844444 0 0 0-2.844444 2.844444v728.177778c0 1.592889 1.251556 2.844444 2.844444 2.844444h728.177778a2.844444 2.844444 0 0 0 2.844445-2.844444v-318.748444z" fill="#979797" p-id="7670"></path></svg>
                            </a>
                            <a class="problem-data-link" th:title="#{testcases}" th:problemId="${problem.problem_id}">
                                <svg class="problem-data-link-icon" viewBox="0 0 1024 1024" p-id="16262" width="200" height="200"><path d="M877.714286 0H146.285714c-20.228571 0-36.571429 16.342857-36.571428 36.571429v256h804.571428V36.571429c0-20.228571-16.342857-36.571429-36.571428-36.571429zM256 192c-25.257143 0-45.714286-20.457143-45.714286-45.714286s20.457143-45.714286 45.714286-45.714285 45.714286 20.457143 45.714286 45.714285-20.457143 45.714286-45.714286 45.714286zM109.714286 987.428571c0 20.228571 16.342857 36.571429 36.571428 36.571429h731.428572c20.228571 0 36.571429-16.342857 36.571428-36.571429V731.428571H109.714286v256z m146.285714-155.428571c25.257143 0 45.714286 20.457143 45.714286 45.714286s-20.457143 45.714286-45.714286 45.714285-45.714286-20.457143-45.714286-45.714285 20.457143-45.714286 45.714286-45.714286zM109.714286 658.285714h804.571428V365.714286H109.714286v292.571428z m146.285714-192c25.257143 0 45.714286 20.457143 45.714286 45.714286s-20.457143 45.714286-45.714286 45.714286-45.714286-20.457143-45.714286-45.714286 20.457143-45.714286 45.714286-45.714286z" p-id="16263" fill="#8a8a8a"></path></svg>
                            </a>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="margin:6px 12px;font-size:15px;">
                <div class="left"></div>
                <div class="right">
                    <a th:if="${pageInfo.hasPreviousPage == true}" th:href="@{/problemset/page/{pageNum}(pageNum=${pageInfo.prePage})}" style="color:#000;text-decoration: none;">&larr;</a>
                    <a th:if="${pageInfo.firstPage > 1}" th:href="@{/problemset/page/1}" style="color:#000;text-decoration: none;">1</a>
                    <span th:if="${pageInfo.firstPage > 2}"  >...</span>
                    <span th:each="nav:${pageInfo.navigatepageNums}">
                    <a th:href="@{/problemset/page/{pageNum}(pageNum=${nav})}" th:text="${nav}" th:if="${nav == pageInfo.pageNum}" style="font-weight: bold;color:#000;text-decoration: none;"></a>
                    <a th:href="@{/problemset/page/{pageNum}(pageNum=${nav})}" th:text="${nav}" th:if="${nav != pageInfo.pageNum}" style="color:#000;text-decoration: none;"></a>
                </span>
                    <span th:if="${pageInfo.lastPage < pageInfo.pages}" >...</span>
                    <a th:if="${pageInfo.pages > pageInfo.lastPage}" th:href="@{/problemset/page/{pageNum}(pageNum=${pageInfo.pages})}" th:text="${pageInfo.pages}" style="color:#000;text-decoration: none;"></a>
                    <a th:if="${pageInfo.hasNextPage == true}" th:href="@{/problemset/page/{pageNum}(pageNum=${pageInfo.nextPage})}" style="color:#000;text-decoration: none;">&rarr;</a>
                </div>
            </div>
        </div>
        <div class="sidebar" th:replace="sidebar::web-sidebar"></div>
    </div>
    <div th:replace="common::web-footer"></div>
</div>
<div th:include="admin/problem-data"></div>
</body>
</html>
